package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JiajiaChongzhiRecord;
import com.ruoyi.system.mapper.JiajiaChongzhiRecordMapper;
import com.ruoyi.system.service.IJiajiaChongzhiRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 充值记录Service业务层处理
 * 
 * @author knd
 * @date 2021-10-13
 */
@Service
public class JiajiaChongzhiRecordServiceImpl implements IJiajiaChongzhiRecordService
{
    @Autowired
    private JiajiaChongzhiRecordMapper jiajiaChongzhiRecordMapper;

    /**
     * 查询充值记录
     * 
     * @param id 充值记录主键
     * @return 充值记录
     */
    @Override
    public JiajiaChongzhiRecord selectJiajiaChongzhiRecordById(Long id)
    {
        return jiajiaChongzhiRecordMapper.selectJiajiaChongzhiRecordById(id);
    }

    /**
     * 查询充值记录列表
     * 
     * @param jiajiaChongzhiRecord 充值记录
     * @return 充值记录
     */
    @Override
    public List<JiajiaChongzhiRecord> selectJiajiaChongzhiRecordList(JiajiaChongzhiRecord jiajiaChongzhiRecord)
    {

        return jiajiaChongzhiRecordMapper.selectJiajiaChongzhiRecordList(jiajiaChongzhiRecord);
    }

    /**
     * 新增充值记录
     * 
     * @param jiajiaChongzhiRecord 充值记录
     * @return 结果
     */
    @Override
    public int insertJiajiaChongzhiRecord(JiajiaChongzhiRecord jiajiaChongzhiRecord)
    {
        return jiajiaChongzhiRecordMapper.insertJiajiaChongzhiRecord(jiajiaChongzhiRecord);
    }

    /**
     * 修改充值记录
     * 
     * @param jiajiaChongzhiRecord 充值记录
     * @return 结果
     */
    @Override
    public int updateJiajiaChongzhiRecord(JiajiaChongzhiRecord jiajiaChongzhiRecord)
    {
        return jiajiaChongzhiRecordMapper.updateJiajiaChongzhiRecord(jiajiaChongzhiRecord);
    }

    /**
     * 批量删除充值记录
     * 
     * @param ids 需要删除的充值记录主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaChongzhiRecordByIds(String ids)
    {
        return jiajiaChongzhiRecordMapper.deleteJiajiaChongzhiRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除充值记录信息
     * 
     * @param id 充值记录主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaChongzhiRecordById(Long id)
    {
        return jiajiaChongzhiRecordMapper.deleteJiajiaChongzhiRecordById(id);
    }
}
